$(document).ready(function() {
    $("#addToFriend1").click(function() {
		addToFriendList();
    }) ;
    
    $("#accept").click(function(){
        $("#decine").hide(); 
    });
    
    $("#decine").click(function(){
        $("#accept").hide(); 
    });
});

function addToFriendList() {
        var account_id = $("#account_id").val();
        var friendNick = $("#friendNick").val();
        var myChar = $("#myChar").val();
        $("#imgLoad").show();
        $.ajax ({
            type: "POST",
            url: "ajax.php",
            data: {
                'account_id' : account_id,
                'friendNick' : friendNick,
                'myChar' : myChar,
                'addToFriend' : 'addToFriend'
            },
            success: function(msg) {
                $("#showAddMessage").html(msg);
                $("#imgLoad").hide();
            }
        });
}